package com.ruoyi.wbgame.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbGameCreateMapper;
import com.ruoyi.wbgame.domain.WbGameCreate;
import com.ruoyi.wbgame.service.IWbGameCreateService;
import com.ruoyi.common.core.text.Convert;

/**
 * 游戏创建Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-16
 */
@Service
public class WbGameCreateServiceImpl implements IWbGameCreateService 
{
    @Autowired
    private WbGameCreateMapper wbGameCreateMapper;

    /**
     * 查询游戏创建
     * 
     * @param teacherId 游戏创建ID
     * @return 游戏创建
     */
    @Override
    public WbGameCreate selectWbGameCreateById(Long teacherId)
    {
        return wbGameCreateMapper.selectWbGameCreateById(teacherId);
    }

    /**
     * 查询游戏创建列表
     * 
     * @param wbGameCreate 游戏创建
     * @return 游戏创建
     */
    @Override
    public List<WbGameCreate> selectWbGameCreateList(WbGameCreate wbGameCreate)
    {
        return wbGameCreateMapper.selectWbGameCreateList(wbGameCreate);
    }

    /**
     * 新增游戏创建
     * 
     * @param wbGameCreate 游戏创建
     * @return 结果
     */
    @Override
    public int insertWbGameCreate(WbGameCreate wbGameCreate)
    {
        wbGameCreate.setCreateTime(DateUtils.getNowDate());
        return wbGameCreateMapper.insertWbGameCreate(wbGameCreate);
    }

    /**
     * 修改游戏创建
     * 
     * @param wbGameCreate 游戏创建
     * @return 结果
     */
    @Override
    public int updateWbGameCreate(WbGameCreate wbGameCreate)
    {
        return wbGameCreateMapper.updateWbGameCreate(wbGameCreate);
    }

    /**
     * 删除游戏创建对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbGameCreateByIds(String ids)
    {
        return wbGameCreateMapper.deleteWbGameCreateByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除游戏创建信息
     * 
     * @param teacherId 游戏创建ID
     * @return 结果
     */
    @Override
    public int deleteWbGameCreateById(Long teacherId)
    {
        return wbGameCreateMapper.deleteWbGameCreateById(teacherId);
    }
}
